import { get } from '@/utils/request';

import { Model } from '@/pages/backhub/model/store/modelTypes';


/**
 * Agent配置接口
 */
export interface AgentConfig {
  id: number;
  name: string;
  identifier: string;
  modelUsage: string;
  fixedModel: string;
  streamOutput: number;
  backgroundPrompt: string;
  welcomeMessage: string;
  promptContent: string;
  scenePrompt: string;
  fileUpload: string;
  referencedFunctions: string;
  recommendedPrompts: string;
  vectorStores: string;
  status: string;
  deleteType: number;
  createTime: Date;
  updateTime: Date;
}

/**
 * 获取智能体详细信息
 * @param id 智能体ID
 * @returns 智能体配置信息
 */
export const getAgentInfo = async (id: number): Promise<AgentConfig> => {
  const response = await get<{ data: AgentConfig }>(`/api/starhub/agent/getInfo/${id}`);
  return response.data;
};


/**
 * 获取模型列表
 * @returns 模型列表
 */
export const getModelList = async (): Promise<Model[]> => {
  return get(`/engine/starhub/model/getList?modelType=chat`);
};